<?php
/**
 * Created by PhpStorm.
 * User: BlueIdeaLirui
 * Date: 2019/09/04
 * Time: 14:58
 */

namespace business\elasticsearch\types;

class LandTakeMapConfigType
{
    /**
     * mapping配置
     * @return array
     */
    public static function mapConfig()
    {
        return [
            'properties' => [
                'uid'             => ['type' => 'long'],
                'src_uid'         => ['type' => 'integer'],
                'title'           => ['type' => 'text','analyzer' => 'ik_max_word'],
                'developer_uid'   => ['type' => 'integer'],
                'company_name'    => [
                    'type'        => 'text',
                    'fields'      => [
                        'keyword' => [
                            'ignore_above' => 256,
                            'type'         => 'keyword'
                        ]
                    ]
                ],
                'take_land_price' => ['type' => 'double'],
                'area'            => ['type' => 'double'],
                'take_land_date'  => [
                    'type'        => 'date',
                    'format'      => 'yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis'
                ],
                'created_time'    => [
                    'type'        => 'date',
                    'format'      => 'yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis'
                ],
            ]
        ];
    }
}
